package com.atguigu.lease.common.advice;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;
import org.springframework.stereotype.Component;

@Data
public class CostomReturnException extends RuntimeException{

    private Integer code; //携带错误码

    //自定义枚举错误信息
    public CostomReturnException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code =resultCodeEnum.getCode();

    }
}
